Patch Scan Templates
A patch scan template enables you to customize the way that target machines are scanned. With this function you can create, modify, find and delete patch scan templates. You cannot delete a predefined template that is provided with Security Controls.
Base URL
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates
Supported Requests
Method | URL | Input | Return |
---|---|---|---|
DELETE |
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/{patch scan template id} |
|
Success or failure code. |
GET |
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates |
||
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplate/{patch scan template id} |
A patch scan template. |
||
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplate/{patch scan template id}/usedby |
UsedBy[] |
||
POST |
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates |
A patch scan template |
|
PUT |
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/{patch scan templated id} |
Success or failure code. |
Input Models
Name | Type | Description |
---|---|---|
count |
Integer |
Provide the count of items to return. The default is 10 and the maximum value is 1000. |
createdByMe |
Boolean |
Returns only those items created by the user. This parameter will be removed in a future release and should only be used in legacy requests. |
name |
String |
Returns the items whose name matches the specified name. |
start |
Integer |
Sets the starting point. The items are sorted by their unique identifier and the starting point is the index into that sorted list. |
path |
String |
Returns the templates containing the path. |
Name | Required? | Type | Default Value | Description |
---|---|---|---|---|
description |
No |
String |
None |
Provides a description that explains the purpose of this patch scan template. |
name |
Yes |
String |
None |
Specifies the patch scan template name. |
patchFilter |
No |
|
None |
Specifies the mode. See PatchFilter. |
path |
No |
String |
None |
The path that describes the location of the machine group within the Patch Scan Templates list in the navigation pane. Example: Lab\Servers |
threadCount |
No |
Integer |
None |
Specifies maximum number of machines that can be simultaneously scanned during one patch scan. |
Example with Sample Response
Find all patch scan templates
GET Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates
Sample Response
{
"count": 2,
"links": {
"next": {
"href": "https://device-name.example.com:3121/st/console/api/v1.0/patch/scanTemplates?count=10&start=3"
}
},
"value": [
{
"creator": "Protect",
"description": "Scans for missing and installed security patches",
"id": "4c7069eb-6e1c-4352-91fc-04d4d8abc07b",
"isSystem": true,
"links": {
"self": {
"href": "https://device-name.example.com:3121/st/console/api/v1.0/patch/scanTemplates/4c7069eb-6e1c-4352-91fc-04d4d8abc07b"
},
"usedby": {
"href": "https://device-name.example.com:3121/st/console/api/v1.0/patch/scanTemplates/4c7069eb-6e1c-4352-91fc-04d4d8abc07b/usedby"
}
},
"name": "Security Patch Scan",
"patchFilter": {
"patchGroupFilterType": "None",
"patchGroupIds": [],
"patchPropertyFilter": {
"customActions": false,
"nonSecurityPatchSeverities": "None",
"securityPatchSeverities": "Critical, Important, Moderate, Low, Unassigned",
"securityTools": false
},
"scanFor": "NecessaryExplicitlyInstalled",
"softwareDistribution": false,
"vendorFamilyProductFilter": {}
}
},
{
"creator": "Protect",
"description": "Scans for missing and installed security and non-security patches",
"id": "0acea94e-38fa-487e-bbe7-54b95aa3c883",
"isSystem": true,
"links": {
"self": {
"href": "https://device-name.example.com:3121/st/console/api/v1.0/patch/scanTemplates/0acea94e-38fa-487e-bbe7-54b95aa3c883"
},
"usedby": {
"href": "https://device-name.example.com:3121/st/console/api/v1.0/patch/scanTemplates/0acea94e-38fa-487e-bbe7-54b95aa3c883/usedby"
}
},
"name": "WUScan",
"patchFilter": {
"patchGroupFilterType": "None",
"patchGroupIds": [],
"patchPropertyFilter": {
"customActions": false,
"nonSecurityPatchSeverities": "Critical, Important, Moderate, Low, Unassigned",
"securityPatchSeverities": "Critical, Important, Moderate, Low, Unassigned",
"securityTools": false
},
"scanFor": "NecessaryExplicitlyInstalled",
"softwareDistribution": false,
"vendorFamilyProductFilter": {}
}
}
]
}
Other Request Examples
DELETE Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/01234567-89AB-CDEF-0123-456789ABCDEF
GET Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates?name=Template-Test
GET Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates?count=4&start=0
GET Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates?createdbyme=true
GET Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/01234567-89AB-CDEF-0123-456789ABCDEF
POST Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates
{
"name": "Sample Patch Scan Template",
"description": "Created by REST API",
"patchFilter": {
"patchPropertyFilter": {
"customActions": false,
"nonSecurityPatchSeverities": "None",
"securityPatchSeverities": "Unassigned, Critical, Important, Moderate, Low",
"securityTools": false
},
"scanFor": "NecessaryExplicitlyInstalled"
}
}
PUT Request
https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/0BA381B1-1D64-468A-9E64-80D39284D939
{"name": "This is the new Name"}
Output Models
Name | Type | Description |
---|---|---|
creator |
String |
The name of the person who created the template. |
description |
String |
Provides a description that explains the purpose of this patch scan template. |
id |
Guid |
Specifies the ID of the patch scan template. |
isSystem |
Boolean |
Indicates if this is a system template. |
links |
Links |
Shows the related URLs for each patch scan template and for the usedby list. |
name |
String |
Specifies the patch scan template name. |
patchFilter |
|
Specifies the mode. See PatchFilter. |
path |
String |
The path that describes the location of the machine group within the Patch Scan Templates list in the navigation pane. Example: Lab\Servers |
threadCount |
Integer |
Specifies maximum number of machines that can be simultaneously scanned during one patch scan. |
Name | Type | Description |
---|---|---|
patchFilePath |
String |
The patch file path. |
patchGroupFilterType |
|
The patch's filter describes how this filter will be applied. The values can be Scan, Skip, or None. If the value is Scan: patchPropertyFilter, softwareDistribution and vendorFamilyProductFilter should not be specified and a patch group or patch file must be specified If the value is Skip: At least one patchPropertyFilter property or software distribution must be set and at least one patch group or a patch file must be specified. If the value is None: At least one patchPropertyFilter property or software distribution must be set and no patch groups or patch group file can be set. |
patchGroupIds |
Integer[] |
The IDs of the patch groups to use. |
patchPropertyFilter |
Patch property filter (security, non-security, critical, etc). |
|
scanFor |
Gets or sets the type of patches to scan for. |
|
softwareDistribution |
Boolean |
Is software distribution included in the scan. |
vendorFamilyProductFilter |
Vendor and family product hierarchy. |
Name | Type | Description |
---|---|---|
customActions |
Boolean |
Custom actions. |
nonSecurityPatchSeverities |
The non-security patch severities. |
|
securityPatchSeverities |
The security patch severities. |
|
securityTools |
Boolean |
Security tools. |
Name | Type | Description |
---|---|---|
excluded |
Excluded product details. |
|
included |
Included product details. |
Name | Type | Description |
---|---|---|
families |
Integer[] |
Gets or sets the families filter. |
products |
Integer[] |
Gets or sets the products filter. |
vendors |
Integer[] |
Gets or sets the vendors filter. |
- Necessary
- NecessaryExplicitelyInstalled
- NecessaryExplicitelyIAndEffectivelynstalled
Name | Type | Description |
---|---|---|
name |
String |
The name of the item using the scan template. |
usageType |
Enum |
The type of component using the scan template. |